home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_07_01 / v7n1062a.txt < prev    next >
Text File  |  1988-09-12  |  1KB  |  53 lines

  1. /*
  2.  * dirret.h    defines and structures for dir_retrieve()
  3.  *
  4.  * (c) Copyright 1988 Aspen Scientific
  5.  * All Rights Reserved.
  6.  */
  7.  
  8. /* define only one of the following host systems
  9.  */
  10. /* build under MS-DOS */
  11. #ifndef A_MSDOS
  12. # define A_MSDOS    1
  13. #endif
  14.  
  15. /* build under Unix */
  16. #ifndef A_UNIX
  17. /** # define A_UNIX    1 **/
  18. #endif
  19.  
  20. /* define this if you have an ansi c compiler
  21.  */
  22. #define A_ANSI    1
  23.  
  24. #define ALLOC_UNIT    5    /* allocate at least this much */
  25.  
  26. /* define the length of each file name under MS-DOS and Unix
  27.  */
  28. #ifdef A_MSDOS
  29. # define _FN_SZ    13        /* sizeof (find_buf.name) */
  30. #else
  31. # include <sys/dir.h>
  32. # define _FN_SZ    DIRSIZ+1    /* see sys/dir.h */
  33. #endif
  34.  
  35. struct dir_retrieve_t {
  36.     char name[ _FN_SZ ];    /* file name */
  37.     char subdir;        /* is it a sub-dir? */
  38. };
  39.  
  40. #ifdef A_ANSI
  41.  
  42. extern struct dir_retrieve_t * dir_retrieve( char *, int * );
  43. extern void dir_free( struct dir_retrieve_t * );
  44.  
  45. #else
  46.  
  47. # define void    int
  48.  
  49. extern struct dir_retrieve_t * dir_retrieve();
  50. extern void dir_free();
  51.  
  52. #endif
  53.